<template>
  <div>
    <p>source</p>
    <el-input v-model="sample"></el-input>
    <RouterLink :to="{ name: 'home' }">to home</RouterLink>
    <RouterView v-slot="{ Component }">
      <KeepAlive v-if="$route.meta.keepAlive">
        <component :is="Component"></component>
      </KeepAlive>
      <component :is="Component" v-else></component>
    </RouterView>
  </div>
</template>
<script lang="ts" setup>
import { onMounted, ref } from 'vue'
import { useRoute } from 'vue-router'
const sample = ref('')
onMounted(() => {
  const route = useRoute()
  console.log(route.path)
  console.log(route.meta.title)
})
</script>
